Method and device for analyzing NC program for NC machining

ABSTRACT

A device for analyzing NC program is provided with a machining method analyzing means ( 34 ) which extracts machining conditions for every machining work element by analyzing an actual NC machining program, and data base creating means ( 35 ). The device extracts necessary machining information from the actual NC machining program and allows the data bases ( 21, 22, 23  and  24 ) to reflect the information.

TECHNICAL FIELD OF THE INVENTION

The present invention relates to a method and apparatus for analyzing an NC program in NC machining, and more particularly, to an improved method and apparatus for analyzing an NC program in NC machining for performing a variety of machining controls using numerical control information, by which it is possible to abstract various machining information or machining conditions from an NC program used for actual machining and to store them as general purpose information which is expansively usable for a numerically controlled machine tool or another type of a numerically controlled machine tool.

BACKGROUND OF THE INVENTION

A numerically controlled machine tool, in which an action of the machine tool can be automatically controlled by an NC program input, has been extensively utilized in various industrial fields as a computer numerically controlled machine tool (CNC machine tool) by being combined with micro processor techniques, power electronics techniques, or software techniques in recent years.

Numerical control information such as an NC program typically includes unique information such as a tool indexing command, a spindle rotational speed command, a feeding speed command, a moving and interpolation command, or an auxiliary function command, and a machining history. Numerical control information, which is necessary for machining to be tool controlled, is formed as an NC program for every machine tool.

In a prior art, numerical control information has been formed as a desired NC program using CAD/CAM or an automatic programming tool, under conditions where material data and a final parts shape are given, adjusted (i.e., corrected and edited) by repeatedly simulating or test-cutting with an actual machine tool at a machining site, and finally used for controlling machining of the tool as an actual machining NC program. Such a prior process for generating an NC program will now be described with reference to FIG. 1.

Material data and a final parts shape consisting of a work shape, drawing data, or the like are supplied to a process design section 1, where respective processes are determined on the basis of information with regard to a machine tool, and a jig or a holder read from a machine specification database 2, and a jig and a holder database 3. The term “process” means a group of all machining steps in which a workpiece never changes its fixed position. The term “machining step” means a group of work elements at the identical machining position of the workpiece. In other words, the term “work element” means a single machining or process performed by a tool, such as drilling or milling, and the term “machining step” means completing a single machining operation at the identical machining position of the workpiece by combining a plurality of work elements. For example, in screw hole cutting, a single machining step consists of three work elements; a center hole machining, a prepared hole machining, and a tapping machining.

After the above-described processes are determined at the process design section 1, in a work design section 4, machining steps to be performed at respective processes and work elements which are necessary for completing the machining steps are recognized on the basis of a work expansion database 5. A tool list and a work instruction sheet for respective work elements are next formed as shown by reference numerals 9 and 10 by using machining information from a tool database 6, a cutting condition database 7, and a machining time calculating database 8. Further, original numerical control information shown as a first process NC program, a second process NC program, etc. is outputted. There is a problem in that the original NC program formed should not mention that it is an optimal program. Therefore the original NC program is transmitted to an NC program correcting and editing section 11, at which a simulation, an idle operation, or a test cutting is performed on the basis of the output numerical control information so as to optimize a tool path and cutting conditions such as a cutting speed, a feeding speed, or a depth of cutting. It is necessary to incorporate know-how obtained at an actual machining site to optimize the program in addition to the above-mentioned simulating or test cutting method. However, in a prior art, since there is no database for doing such correcting work, it is done manually by a skilled worker in a usual case.

For example, in a case where chatter is generated at a part of a workpiece when numerical control information outputted from a CAM is test cut, the numerical control information is required to correct and alter a feeding speed or a rotation frequency of the part or to alter a width or a depth of cutting. Such correction is done by a skilled worker at a machining site in a prior art, and the original NC program is directly corrected at the NC program correcting and editing section 11.

Furthermore, when a tool path is also required to be delicately corrected, it is impossible to perform such feedback due to lack of CAM ability or the like in many cases. Even if the change of the databases is necessary; therefore, the know-how possessed by a machining site worker was rarely feedback to the databases to form an NC program.

Moreover, the reason for requiring the correction of an original NC program at a machining site in the prior art is that the original NC program for a unique workpiece is not always applied to a unique machine tool. Accordingly, the change of numerical control information may be required depending on ability or specification of a machine tool, which in turn needs to calculate a machining time again and to alter respective work instruction sheets.

After such optimization is done, the tool list and the work instruction sheet are formed again, and sent to a numerical control section 14 as a corrected first process tool list and work instruction sheet 12 and a corrected second process tool list and work instruction sheet 13. Therefore, in the prior art, these corrected first process NC program, second process NC program, etc. are used as actual machining NC programs at an actual machining site.

As described above, in the conventional NC machining system, there are problems such that work for correcting and editing numerical control information is not repeatedly utilized, feedback, or stored so as to be reusable as know-how. There is a large problem that it is difficult to reuse the program correcting and editing data such as various know-how at a machining site because the correction of the data is totally dependent on a skilled worker in the prior art as mentioned above. This means that an original NC program, which can be easily formed using a CAD/CAM system or an automatic programming system, can not be directly applied to each individual machine tool in the prior art; and therefore the editing and correction of the program are required for every machining process. An actual machining NC program, which is usable at a machining site, as a machining program for quantity production, can be obtained after such complicated processes have been completed. Accordingly, it does not sufficiently satisfy a machine tool user from the viewpoint of simple and easy use.

In addition, it is, of course, necessary to correct an NC program drastically when the type of machine tool is changed. Furthermore, such situations arise that an NC program formed in the past can not be utilized when a new machine tool of different type or an identical type with an improved specification is introduced.

In view of the foregoing problems, the object of the present invention is to analyze an actual machining NC program which has been corrected and edited, to extract various machining conditions such as know-how obtained at a machining site from an actual machining NC program actually used at the machining site for quantity production or an optimal machining information or machining conditions for a unique workpiece, and to allow them to be used as databases. The abstracted machining information or machining conditions will retrieve an optimal machining method or an optimal machining condition, which is inherent in respective machines, by being systematically associated with material information, drawing information, machine information, tool information or measured data, etc., which in turn allows an optimal machining program for respective machining sites and respective cases to be automatically and instantaneously programmed from the feedback databases. The databases can be supplied not only to one machine tool but also another machine tool. Therefore, it will be possible to perform all or the major part of correction and editing in accordance with a dialogue with the databases without depending on a skilled worker by opening the databases to all machine tools constituting a CIM (Computer Integrated Manufacturing) facility.

SUMMARY OF THE INVENTION

The present invention is an apparatus for analyzing an NC program in NC machining, wherein the NC machining is controlled by the NC program, comprising: machining method analyzing means for abstracting machining information or a machining condition by analyzing the NC program; and storage means for storing the machining condition rewritably.

The present invention is an apparatus for analyzing an NC program in NC machining, wherein the NC machining is controlled by the NC program, comprising: machining method analyzing means for abstracting machining information or a machining condition for each work element machining by analyzing the NC program; and storage means for storing the machining condition rewritably so as to correspond to each work element machining.

The present invention is an NC machining apparatus for performing NC machining controlled by an NC program comprising:

machining method analyzing means, to which an actual machining NC program, material data and a tool list are inputted, for abstracting machining information or a machining condition for each work element machining by analyzing the actual machining NC program; database forming means for converting the machining information or the machining condition abstracted for each work element machining into a database which is necessary to form the NC program; and an NC program forming database for storing the machining condition rewritably so as to correspond to each work element machining.

Furthermore, the present invention is an apparatus for analyzing an NC program in NC machining, according to claim 1, 2, or 3, wherein said machining method analyzing means comprising: a dividing section for dividing an actual machining NC program into respective work element machinings; and a machining condition abstracting section for abstracting a machining condition from the actual machining NC program.

In addition, the present invention is an apparatus for analyzing an NC program in an NC machining, according to claim 4, wherein a pattern definition storing section for collating and judging the work element machining from a tool machining locus is connected to the dividing section for dividing the actual machining NC program into respective work element machinings.

Moreover, the present invention is an NC machining apparatus for reforming NC machining according to claim 3, wherein the database contains at least a cutting condition database and a tool database.

In another aspect, the present invention is a method for analyzing an NC program in NC machining, wherein the NC machining is controlled by the NC program, comprising: a machining method analyzing step for abstracting machining information or a machining condition by analyzing the NC program; and a storage step for storing the machining condition rewritably.

Furthermore, the present invention is a method for performing NC machining controlled by an NC program comprising: a machining method analyzing step for abstracting machining information or a machining condition for each work element machining by analyzing the NC program; and a storage step for storing the machining condition rewritably so as to correspond to each work element machining.

Moreover, the present invention is a method for performing NC machining controlled by an NC program comprising: a machining method analyzing step, at which an actual machining NC program, material data and a tool list are inputted, for abstracting machining information or a machining condition for each work element machining by analyzing the actual machining NC program; and a database forming step for storing the machining information on the machining condition abstracted for each work element machining rewritably so as to correspond to each work element machining as a database which is necessary to form the NC program.

In another aspect, the present invention is a computer program product, which is executed by a computer, comprising a recording medium having a set of computer program instructions recorded thereon, the computer program product comprising: machining method analyzing means, recorded on the recording medium, for abstracting machining information or a machining condition by analyzing an NC program; and storage means, recorded on the recording medium, for storing the machining condition rewritably.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a view showing NC program forming procedures in a prior art.

FIG. 2 is a block diagram showing the entire constitution of a numerical control system in which a method and apparatus for analyzing an NC program according to the present invention are incorporated.

FIG. 3 is a block diagram of the principal parts of an NC machining system regarding the present invention in the system shown in FIG. 2.

FIGS. 4A, 4B, and 4C show one example of an actual machining NC program used in an embodiment of the present invention.

FIG. 5 is a view showing a shape of a material used in an embodiment of the present invention.

FIG. 6 is a view showing a machined final shape according to an embodiment of the present invention.

FIG. 7 shows a tool list according to an embodiment of the present invention.

FIGS. 8A, 8B, 8C, 8D, 8E are G-code expansion lists obtained from the actual machining NC program according to an embodiment of the present invention.

FIG. 9 is a list of work elements, used tools, and program analyzing method relative to an individual machining step according to an embodiment of the present invention.

FIG. 10 is a work element list.

FIG. 11 shows an example of a workpiece database as an intermediate database according to an embodiment of the present invention.

FIG. 12 shows an example of a machining pattern list database as an intermediate database according to an embodiment of the present invention.

FIG. 13 shows an example of a drilling element list database (in analyzing order) as an intermediate database according to an embodiment of the present invention.

FIG. 14 shows an example of a drilling element list database (in the same hole order) as an intermediate database according to an embodiment of the present invention.

FIG. 15 shows an example of a cutting condition database which shows machining conditions for individual work element machining according to an embodiment of the present invention.

FIG. 16 shows an example of a tool database which shows tool machining conditions for individual work element machining according to an embodiment of the present invention.

FIG. 17 shows an example of machining pattern definition according to an embodiment of the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

Referring to FIG. 2, the entire constitution of a numerical control machine tool system in which a method and apparatus for analyzing an NC program according to the present invention are incorporated is shown.

An NC program is formed in a condition where material data and a final parts shape are given, similarly to the prior art. In the drawing, the material data includes the shape and the type of the material. NC program forming means 20 forms a desired NC program on the basis of the inputted material data and the final parts shape plus know-how data, stored in the past, given from various databases. In the present embodiment, the databases consist of a work expansion database 21, a cutting condition database 22, a tool database 23, and a machining history database 24. The know-how obtained at a machining site in the past, necessary conditions for actual machining, and conditions unique to a machine tool used are supplied to the NC program forming means 20 as reference data for forming an NC program from each of the databases 21, 22, 23, and 24.

The NC program formed as described above and a tool list are sent to a numerical control device 25, then an necessary idle operation, a test cut, or a simulation is carried out, and the NC program is further corrected and edited as described in FIG. 1, thereby completing an actual machining NC program which can be used at an actual machining site by the numerical control device 25. The correcting and editing section of the NC program is not depicted in detail in FIG. 2.

The numerical control device 25 includes an NC program executing means 27, a servo control means 28, and an error correction means 29 for operating a machine tool 26. The NC program, the tool list and the material data are inputted to the NC program executing means 27. The NC program executing means 27 can interpolate on the basis of an appropriate feeding speed using the input data while referring to measured results described later, and supply a servo control signal to the servo control means 28, which in turn allows the feed operation of the machine tool 26 to be properly controlled by the output operation signal of the servo control means 28 in accordance with the NC program. The error correction means 29, provided for correcting a positional and/or dimensional error of the machine tool 26 due to temperature change, can correct an error or the like caused by temperature change using the output of a measuring instrument mounted on the machine tool 26.

Thus, the machine tool 26 performs desired work element machinings, machining step machinings, and a process machining on a workpiece 30 mounted on a table according to the NC program, completing the machining at a first position of the workpiece 30.

After the process machining at the first position of the workpiece 30 has been completed, a measuring instrument 31 measures the coordinates of the workpiece 30 in accordance with a measuring program of a measuring control device 32. The measured result is feedback to the NC program executing means 27 and a machining method analyzing means 34 via measured result analyzing means 33, and is also supplied to each of the databases 21, 22, 23, and 24 if necessary. As described above, it is possible to perform a desired numerically controlled machining on the workpiece 30 on the basis of the NC program formed. The position of the workpiece 30 is changed after the process machining at the first position is finished, and thereafter machinings according to the NC program are successively performed at a second position similar to the first position.

The characterized part of the present invention is that the content of the actual machining NC program executed by the numerical control device 25 is appropriately analyzed to abstract machining information such as machining know-how included in the actual machining NC program, and the abstracted machining information can be stored rewritably. In the present invention, the machining information is abstracted as machining conditions for each work element machining from the analyzed results of the NC program, and the machining conditions are stored in a storage means so as to correspond to each work element machining.

In FIG. 2, the machining program, the tool list and the measured results are supplied to the machining method analyzing means 34, which abstracts necessary machining information according to a predetermined algorithm as described later. Then, the abstracted machining information is supplied to a database forming means 35, where the machining information classified in each item are written and stored as machining conditions corresponding to each work element machining in the respective databases: the work expansion database 21, the cutting condition database 22, the tool database 23, and the machining history database 24.

Therefore, after the actual machining of the workpiece 30 is performed by the machine tool 26, each of the databases 21 to 24 can always obtain the machining information such as the know-how at a machining site reflecting the actual machining, and renew the content of the databases, and the content of the renewed databases can be reflected in the present machining, which allows the machining information to be given as the optimal databases when the next NC program is formed.

As described above, according to the NC machining system of the present invention, it is possible to obtain an excellent advantage as described in the following. The machining information such as the know-how at a machining site, which has been used only for correcting and editing the original NC program in the prior art, is analyzed and abstracted from the corrected actual machining NC program actually used for the machining site, and as a result the abstracted information can be instantaneously reflected in the databases. Therefore, it is possible for the NC program forming means to form an NC program which incorporates the latest know-how at the machining site at all times because of the reflection of the work information in the databases, remarkably simplifying the correcting and editing work from an original machining program to an actual machining program compared to the prior art.

In addition, such reflection of the machining information in the databases can be performed in a period in which several machining steps are done from the actual machining starts, thereby making it possible to apply to successive NC programs or a present NC program for re-adjusting.

Moreover, according to the present invention, each of databases including the reflected machining information can freely apply to any machine tool constituting a CIM. Of course, if the material or final parts shape is changed, it is possible to use a part of the databases relating to machine tools or tools as it is. Therefore, the databases will be usable for forming any numerical control information or for executing it, by opening such data to all terminal apparatuses constituting the CIM. Such excellent advantages of the present invention depend on the fact that the machining information is modularized as machining conditions for each work element machining in this embodiment, which allows the flexibility of the stored databases to be remarkably increased.

An example of an analyzing process of the NC program and an abstracting process of the machining information or the machining conditions at the machining method analyzing means 34 will next described in detail.

FIG. 3 is a detailed block diagram of a program analyzing device according to the present invention in the numerical control system in FIG. 2. The actual machining NC program, the material data, and the tool list are inputted to the machining method analyzing means 34. If necessary, the final machining shape and measured result are also inputted.

In the machining method analyzing means 34, each input data is stored in a storage device 40, the actual machining NC program is analyzed per block and data-converted at a numerical data convert section 41, and each data is registered as a G code expansion list at a G code expansion list generating section 42. A program, which has a plurality of operations for one block such as a macro program or a subprogram, is registered in the G code expansion list, after being expanded to basic instructions in accordance with RS-274-D format. Such expansion to the G code is not always required in the present invention. However, in this embodiment, the data are expanded to the G code with which analyzing is facilitated, because the actual machining NC program is processed using a computer.

In the machining method analyzing means 34, the successive actual machining program is divided into respective work elements while referring to the G code expansion list at a dividing section 43. While the G code expansion program divided into respective work elements refers to a pattern definition stored in a pattern definition storage section 44, machining conditions for each work element are abstracted at a machining conditions abstracting section 45. The abstracted machining conditions for each work element is stored, via the database forming means 35, in the work expansion database 21, the cutting condition database 22, the tool database 23, and the machining history database 24 as above-described.

In general, the program division for each work element machining at the dividing section 43 is preferably performed while taking note of a sequence number (N number), tool dividing code (T code), tool replacement (M6), and optional stop (M01). Practically, in the program division for each work element, taking note of the tool replacement is done first, and while a tool is replaced a single tool is used, which can be regarded as an end of a work element. However, since a plurality of work element machinings may be performed with the same tool, for example, a plurality of prepared holes may be drilled with the same drill, it is preferable to read a tool locus pattern in addition to the tool replacement, thereby securely performing the program division for each work element machining.

The machining conditions abstracting section 45 abstracts necessary machining conditions from the program divided for each work element. In the present embodiment, when it is difficult to directly abstract the work conditions, the abstracting section 45 first recognizes the content of the work elements from the tool locus in the divided area and a work shape and forms a workpiece database as an intermediate database for each pattern list from the result of the recognition. For example, a drilling element list in the case of drilling is nominated as the above pattern list.

In the present embodiment, the above-mentioned machining conditions are written in each database for each work element machining. Generally, the machined material, the used tool, and each cutting condition are stored as the associated data for each work element machining. In this case, the cutting conditions are preferably stored as a cutting speed of each tool, and a feeding quantity per tooth or per rotation, not as a rotation speed or a feeding quantity of a tool which is usually used, allowing flexible modularized data to be formed, thereby making it possible to calculate a cutting condition of a tool having an approximate diameter from these basic data whenever required.

ONE EXAMPLE OF PROGRAM ANALYSIS

FIGS. 4A, 4B, and 4C shows one example of an actual machining NC program, with a program number 00001, used in the present embodiment.

FIG. 5 shows a material shape machined by the actual machining NC program. FIG. 6 shows a machined final shape manufactured from the material shown in FIG. 5 by the actual machining program. The material data including a type of material and the machined final shape are supplied to the machining method analyzing means 34. As shown in FIG. 6, millings at the top face and the side faces, two drillings of the screw holes at the front face, four drillings with chamfers at the top face, and a slot machining are required as the machining processes.

For such machinings, the NC program forming means 20 determines a machining procedure, expands it into work elements, determines tools used for each work element, and determines a cutting condition for each tool.

FIG. 7 shows a tool list used in the program 00001, wherein each tool number is represented in T code and respective tool data are listed as shown, the tool list is supplied to the machining method analyzing means 34 as described above. In the machining method analyzing means 34, after the actual machining NC program is stored in the storage device 40, the stored data is transmitted via the numerical data converting section 41 to the G code expansion list generating section 42, where the data is converted to a G code expansion list with which computer analyzing is facilitated. FIGS. 8A, 8B, 8C, 8D, and 8E show a G code expansion list of the actual machining NC program 00001. The program shown in FIGS. 4A to 4C and the G code expansion list shown in FIG. 8. 8A to 8E are linked by the line numbers, and they have substantially the same content.

In the present embodiment, the actual NC program is classified into nine types; 1 to 9 of the sequence number N. The nine sequences are distinguished as processes each using a different tool. Of course, according to the present invention, a work element by which a different portion of the material is machined is recognized as a different work element even if the same tool is used. Thus, as described above, the program is divided into respective work elements on the basis of the machining locus pattern of a tool. However, for simplification of the explanation, the abstraction of the machining condition for each work element machining is described for the nine sequence numbers N.

ANALYSIS OF WORK ELEMENT IN N1

A command T1 is given in the line number 4, and a command M6 (tool replacement) is given in the line number 5, it is understood that a tool T1 is used for machining from the line number 7 until a next command M6 (tool replacement) is given. In the present embodiment, although a group of such programs is represented as the sequence number N1, it is apparent that such a sequence number has no meaning for a machine tool in the actual machining NC program.

It is understood that the tool T1 is a face mill with a diameter of 100 mm from T code 1 in the tool list shown in FIG. 7. The line number 7 designates a work coordinate system G54, in the present embodiment, which means the top face of the machined final shape shown in FIG. 6, defined as a machining of a first process.

In the line number 10, feeding for cutting is given the first time, wherein the cut face is a coordinate of Z0.1 (line number 9). A falling point of the face mill is set at (160, 50) in the X-Y coordinate system in the line number 7. It is understood from the line numbers 10 to 13 that the Z coordinate does not change and a moving axis alternately moves, for example, from X to Y to X to Y. By collating such a tool locus pattern with definition data stored in the pattern definition storage section 44, it is possible to judge a work element as a face machining step. An example of work elements and used tools for a machining step, and a pattern definition of a program analyzing method is shown in FIG. 9. The recognition of each work element machining is performed by using such pattern definition.

FIG. 10 shows an example of a work element list. In the present embodiment, machining conditions are formed as a variety of intermediate lists for each work element machining, and finally stored in the databases 21 to 24 shown in FIG. 3 as flexible modularized data. Of course, the list of the work elements shown in FIG. 10 is an example. In the present invention, it is also preferable to define work elements which are obtained by dividing relatively large work elements shown in FIG. 10, and to form a machining condition database according to the work element defined for each step. The level of such definition of the work element can be freely defined in accordance with accuracy of a machine tool or a resolution of the entire machining system.

After the division for each work element machining has been performed, the result is stored as an intermediate work condition list. In the present embodiment, three types of list, a workpiece database, a machining pattern list database, and drilling element list, are prepared.

FIG. 11 shows an example of the workpiece database. A combination of work elements of the workpiece for each machining step, and tools used for each machining step are listed. Similarly, a workpiece file and a locus list file are produced for each work element. In FIG. 11, No. 1 and 2 show that face machinings are performed with two work elements, a rough milling and a finishing milling respectively, and a different tool is used for a different locus.

FIG. 12 shows machining pattern list data. Each machining pattern is classified as a face machining step, a pocket machining step, a core machining step, a slot machining step, or a drilling element, and each machining step consisting of work elements, and the depth of machining and the cutting method are recorded sequentially.

FIGS. 13 and 14 shows drilling element list. FIG. 13 shows it in analyzing order, and FIG. 14 shows it in the same hole order.

In the present embodiment, desired machining conditions for each work element machining are abstracted while analyzing each work element making use of the above-described three intermediate list databases, and the abstracted conditions are written in the intermediate databases.

As described above, since the work element of the sequence number N1 is judged as a face machining step, desired items are set to the face machining pattern list database from the result, and further required cutting conditions derived from the spindle rotation frequency and the feeding speed are written.

The program will be further analyzed for the sequence number N1. It is judged that the line numbers 15, 16, and 17 are finishing machinings, because the line numbers 10, 11, and 12 and the line numbers 15, 16, and 17 have the same locus with a different z coordinate and additionally there is no work element with the same tool later. Since the work element is a face machining step, the dimension of the material is converted into successive point elements, stored at a workpiece file AAA1 in the workpiece database (referring to FIG. 11), and stored as a face machining step in the workpiece database No. 1 and 2. Simultaneously, the line numbers 15, 16, and 17 are stored in a locus list file 1234, and associated with the workpiece database No. 1 and 2.

Next, the line numbers 19 to 30 are judged as a second process, since they indicate the work coordinate system G55, or a coordinate system for the front machining of the machined final shape shown in FIG. 6 in the present embodiment. It is judged that the line numbers 22, 23, and 24 are rough machinings, and the line numbers 27, 28, and 29 are finishing machinings, because the line numbers 22, 23, and 24 and the line numbers 27, 28, and 29 have the same locus with a different Z coordinate and additionally the difference in the Z coordinate is 0.1. Furthermore, a cutting area is judged as a face machining step since it covers the whole of the workpiece, and registered in the workpiece database similar to the first process.

As above mentioned, the sequence N involves a plurality of work elements, which are written in the intermediate databases according to the analysis, and further, machining conditions are written from these databases to the cutting condition database shown in FIG. 15. The cutting condition database is designated as reference numeral 22 in FIGS. 2 and 3. It is apparent from the drawings that the machining condition is stored so as to correspond to each work element machining. In this embodiment, the machining condition is such that a tool number indicates a used tool, a work material indicates the type of material, and a cutting speed of the tool, a feeding quantity per tooth (F1), a feeding quantity per rotation (F2), W (a cutting width per feed), and H (a cutting height per feed) are caused to be databases. Accordingly, by using the cutting condition database, an optimal selected tool for the type of the workpiece material and an optimal machining condition are stored for each work element. Thus, it is possible to select the optimal machining cutting speed, feeding, and cutting for each work element, if the type of workpiece or a tool is determined for each work element, which means that such modularized databases allow the optimal program to be directly selected when an NC machining program is formed, without requiring complicated correction and edition as in the prior art.

The reason for this is that the cutting condition database shown in FIG. 15 has already represented the optimal conditions in the specified circumstances after taking the machining site know-how, the simulation, and the test cut into consideration, which allows a machining condition in the same circumstances or conditions generated thereafter to be easily retrieved from such databases. Of course, it is actually difficult to prepare such a cutting condition database for all cases. However, according to the NC machining system of the present invention, data are successively accumulated in these databases, which is freely and flexibly usable not only for a single machine tool but also for all machine tools consisting of a CIM or another machine tool. Additionally, the amount of the accumulated data increases every time a new NC program is formed, and thus the databases grow continuously. Moreover, it is possible to easily reflect machining results obtained by another machine tool into an NC program even if the specified machine tool is in an idle state. Therefore, the NC machining system of the present embodiment has an advantage that it has an excellent growth and extendibility.

The cutting condition database shown in FIG. 15 of the present embodiment also stores a cutting time, a cutting distance, and a plurality of tip points, which are set as cutting edges, reflecting the measured results obtained from the measured result analyzing means 33, as well as the number of times the workpiece is contacted at five points 1 to 5 in the figure, a cutting start angle, and a cutting end angle, thereby obtaining an extended effect from such utilizing results of a tool.

Data of the utilizing results of a tool can be used for a tool database shown in FIG. 16 to reflect it. In the tool database 23 shown in FIGS. 2 and 3, a durable life value, an amount of wear, and a remainder of life can be written as shown in FIG. 16, and what wear history should be taken for specified utilizing results and a substantial durable life value for a tool can be stored, which in turn allows an NC program to be formed taking an optimal tool selection adopted when the NC program is formed, a tool replacement, and further a relationship between a final machined shape and a tool, etc. into consideration.

In the foregoing, the work element analysis of the sequence N1 and the abstraction of the work condition, the specified machining method, the abstraction, and the storage action into the databases according to the present embodiment have been described. Analysis of the work elements for the sequences N2 to N9 are next briefly explained.

ANALYSIS OF WORK ELEMENTS IN N2

The spindle tool will be T2 from the line number 31, transferring to work elements in N2. A tool T2 is recognized as a center drill with a diameter of 3 mm from the tool list shown in FIG. 7, resulting in the work elements in N2 being judged as drilling elements. Five work elements in a first process and two work elements in a second process mentioned later are intermediately stored in the drilling element list shown in FIGS. 13 and 14, the machining condition obtained is stored in the cutting condition database shown in FIG. 15 and the tool database shown in FIG. 16 so as to correspond to each work element machining.

FIRST PROCESS (G54)

coordinate 1 (70.000, 50.000) coordinate 2 (−70.000, 50.000)

coordinate 3 (−70.000, 50.000) coordinate 4 (70.000, −50.000)

coordinate 5 (30.000, 0.000).

SECOND PROCESS (G55)

coordinate 1 (40.000, 0.000) coordinate 2 (−40.000, 0.000)

ANALYSIS OF WORK ELEMENTS IN N3

The spindle tool will be T3 from the line number 47, transferring to work elements in N3. A tool T3 is recognized as a drill with a diameter of 20 mm from the tool list, resulting in the work elements in N3 being judged as drilling elements. Five work elements mentioned below are written in the drilling element list 19 and 20, and additionally stored in the cutting condition database and the tool database similar to the above-described sequence.

FIRST PROCESS (G54)

coordinate 1 (70.000, 50.000) coordinate 2 (−70.000, 50.000) coordinate 3 (−70.000, 50.000) coordinate 4 (70.000, −50.000)

ANALYSIS OF WORK ELEMENTS IN N4

The spindle tool will be T4 from the line number 57. A tool T4 is recognized as a drill with a diameter of 30 mm from the tool list, resulting in the work elements in N4 being judged as drilling elements. Three work elements mentioned below are set in the drilling element list, and stored in the cutting condition database and the tool database.

FIRST PROCESS (G54)

coordinate 1 (30.000, 0.000, −19.9)

SECOND PROCESS (G55)

coordinate 1 (40.000, 0.000, −21.0)

coordinate 2 (−40.000, 0.000, −21.0)

ANALYSIS OF WORK ELEMENTS IN N5

The spindle tool will be T5, or will be changed to an end mill with a diameter of 25 mm by the line number 68.

Generally, it is difficult to judge a type of work element only from a tool used, because there are many machining patterns corresponding to, for example, an end mill or a face mill. In the present embodiment, the judgment is performed by collating a tool machining locus with a machining pattern definition. Although some examples have already been shown for a face mill and a drill, an example of a corresponding relationship between the machining pattern definition and the machining steps is further shown in FIG. 17.

Returning to the work elements in the sequence N5, the line numbers 71 to 74 show the falling down to the machining face (Z-19.9) at the process 1 (G54) and coordinate 3 (30, 0), the line numbers 75 to 81 show the moving in the same plane, allowing a locus to be judged as a loop or closed because the coordinate (−50, 0) in the line number 75 and the coordinate (−50, 0) in the line number 80 are identical. The line numbers 5 to 80 are judged as the inside relative to the locus because a left side correction of G41 is performed in the line number 75. A locus shifted to inside by the radius of the tool relative to the locus is provided by G41, further a locus shifted by the radius of the tool relative to the locus is found. However, the locus has already been lost. It is judged from these tool loci that there are no cutting remnants in the inside when the tool moves from the line numbers 75 to 80, allowing it to be judged as pocket machining steps. This is a pattern when an end mill is used for the machining step pocket from the machining pattern definition shown in FIG. 17. Therefore it is possible to securely analyze a program making use of the pattern definition as FIG. 17, even for such a complicated program.

The movement in the line number 75 is judged as an approach, and the movement in the line number 81 is judged as a recess. An amount of the approach and an amount of the recess are stored in a pocket machining step pattern list shown in FIG. 12.

It moves above the work face in the line number 82, and is positioned at the coordinate (40, 0) of the second process (G55) in the line number 83. It moves in the same plane in the line numbers 86 to 88, moves through the circumferential locus in the line number 87, and is judged as the inside relative to the locus because a left side correction of G41 is performed for the locus in the line number 86. A locus shifted to the inside by the radius of the tool is found by G41, and further a locus shifted by the radius of the tool is found. However, the locus has already been lost by the judgment 1. Therefore it is judged that there are no cutting remnants in the inside, allowing it to be judged as pocket machining steps. Similarly, the line numbers 93 to 95 are judged as the pocket machining step. However, the center coordinate of the pocket machining step is judged as a drilling element from the conditions that it is pre-machined by the work element in the sequences N2 and N4 and the shape of the pocket is a circle. Thus, it is possible to recognize the work element for the sequence N5 making use of the machining pattern definition, and to reflect the defined machining conditions in the database as the machining condition involving know-how. In the present embodiment, while the machining conditions for each work element machining are stored in the cutting condition database shown in FIG. 15 and the tool database shown in FIG. 16, the above-described analyzed results are of course supplied to the work expansion database 21 and the machining history database 24 shown in FIGS. 2 and 3, and stored for each work element.

ANALYSIS OF WORK ELEMENTS IN N6

The spindle tool will be T6, or an end mill with a diameter of 25 mm from the line number 97.

The line numbers 105 to 108 show the movement in the same plane, allowing a shape to be judged as a loop because the coordinates in the line numbers 105 and 108 are identical. The locus and the tools are collated in the judgment 1. It is judged from the judged result that there are no cutting remnants in the inside, allowing it to be judged as pocket machining steps. Then, the locus can be judged as a finishing machining because it is identical to that in the sequence N5, and the machining of work element 1 in the sequence N5 can be judged as rough machining. Thereafter, the points in the line numbers 105 to 108 are judged as a finishing shape, stored in a workpiece file BBB1 (the workpiece database in FIG. 11), and stored at No. 5.6 in the workpiece database as a pocket work element.

ANALYSIS OF WORK ELEMENTS IN N7

The spindle tool will be T7 from the line number 111. A tool T7 is recognized as a drill with a diameter of 8.2 mm. Therefore, the sequence N7 is judged as a drilling element, and the following work elements are stored in the drilling element list.

FIRST PROCESS (G55)

coordinate 1 (40.000, 0.000)

coordinate 2 (−40.000, 0.000)

ANALYSIS OF WORK ELEMENTS IN N8

The spindle tool will be T8 from the line number 119. A tool T8 is recognized as a chamfer tool with a diameter of 25 mm. Since it is fixed by a drilling cycle of G81 until the Z axis rises in the line numbers 124 to 128, the work elements in N8 are judged as a drilling element, and the following work elements are stored in the drilling element list.

FIRST PROCESS (G54)

coordinate 1 (70.000, 50.000)

coordinate 2 (−70.000, 50.000)

coordinate 3 (−70.000, −50.000)

coordinate 4 (70.000, −50.000)

SECOND PROCESS (G55)

coordinate 1 (40.000, 0.000)

coordinate 2 (−40.000, 0.000)

ANALYSIS OF WORK ELEMENTS IN N9

The spindle tool will be T9 in the line number 134, replacing a tool with a M10 tap. Therefore, the sequence N9 is judged as a drilling element, and the following work elements are stored in the drilling element list.

FIRST PROCESS (G55)

coordinate 1 (40.000, 0.000)

coordinate 2 (−40.000, 0.000)

As described above, the actual NC machining program is sequentially analyzed, and the workpiece database (FIG. 11), the machining pattern list database (FIG. 12), and the drilling element list database (FIGS. 13 and 14) are formed as intermediate databases for each work element. Further, the cutting condition database (FIG. 15) and the tool database (FIG. 16) are formed on the basis of these intermediate databases, and similarly the machining conditions abstracted from the actual machining NC program are directly stored or memorized in the work expansion database 21 and the machining history database 24, which are not shown in detail.

Each of the above-described intermediate databases itself has necessary data, and these intermediate databases may be used as auxiliary databases for the NC program forming means 20 or, of course, as auxiliary storage means in the present invention.

In the present invention, the analyzing program may be formed as a recording medium, typically supplied as a floppy disk, a hard disk, ROM, or CD memory, etc., in which a machining method analyzing procedure and a database forming procedure are recorded.

EFFECTS OF THE INVENTION

As described above, according to the NC machining system of the present invention, machining methods are analyzed from an NC machining program used for an actual machining at a machining site to abstract a necessary machining condition. Further it is possible to reflect conditions in the database having data when the NC program is formed. Therefore, it is possible to form a database by securely abstracting the machining conditions including the correction and edition of the program obtained only from the machining site know-how, a test cut, or a simulation, which in turn allows a useful information database to be easily constituted.

According to the present invention, on the basis of numerical control information formed whenever machining is required, a material shape, a machined final shape, machining processes, tool information, and cutting condition are accumulated so as to be associated with the ability of a machine tool using the numerical control information, accuracy measuring data in machining, or a machining time, which in turn allows the machining conditions obtained by incorporating all of information such as know-how possessed by each of the numerical control information and various know-how obtained at a machining site to be formed into a database.

As a result, even when the former numerical control information changes, it is possible to automatically form a numerical control program which involves the optimal machining know-how by simple auto-programming, without clumsily utilizing the optimal machining know-how by a test cut or a simulation which is necessary for the prior part. Thus, it is possible to eliminate irregularities of the machining condition depending on the former numerical control information, which means that the machining can be efficiently performed with the optimal machining condition, allowing machining quality to be maintained or increased and allowing a machining time to be shortened.

Moreover, when a program formed for a specified machine tool is applied to another machine tool having a different machining ability, it is possible to automatically form a new numerical control program by individually using modularized machining conditions, while the difference of the machining ability between a machine tool for which a program is formed and a new improved machine tool is taken into consideration. For example, machining data accumulated by an old type machine tool is used as information for a new type machine tool, except for the changed points, and only new information about the changed points is added. Thus, even for automatic programming, it is possible to easily perform the optimal programming which reflects the data accumulated in the past.

As a result, it is possible to increase productivity throughout a factory.

Furthermore, the machining conditions for each work element machining used in an NC machining system with regard to the present invention can be used for machining by any other machine tool. Therefore, it is possible to obtain a continuously growing database by improving the overall machining efficiency using such machining information for the whole of a CIM and by sharing such a database. 

What is claimed is:
 1. An NC machining apparatus for performing NC machining controlled by an NC program, comprising: machining method analyzing means, to which a machining NC program, material data and tool list are inputted, for extracting, from the machining NC program, at least one of a machining information and a machining condition for each work element machining by analyzing the machining NC program; database forming means for converting the at least one machining information and the machining condition extracted for each work element machining into a database which is necessary to form the machining NC program; and an NC program forming database for storing, for each work element machining, the at least one machining condition and machining information extracted from the machining NC program for that work element machining so as to correspond to that work element machining.
 2. An NC machining apparatus for performing NC machining, according to claim 1, wherein the NC program forming database contains at least a cutting condition database and a tool database.
 3. A method for performing NC machining controlled by an NC program, comprising: extracting, from an inputted machining NC program, inputted material data and an inputted tool list, at least one of a machining information and a machining condition for each work element machining; and storing, for each work element machining, the at least one machining condition and machining information extracted from the inputted machining NC program, inputted material data and an inputted tool list for that work element machining so as to correspond to that work element machining as a database which is necessary to form the NC program.
 4. A system that builds a database of machining know-how information regarding NC machining work elements usable in a first NC program for NC machining, wherein the NC machining is controllable using the first NC program to form a first object, comprising: extracting means for extracting from the first NC program, for each of at least one work element of the first NC program, at least one of machining information and machining condition information for that work element, wherein that work element is usable to create a corresponding feature in the first object; and storage means for storing, for each work element, the at least one of the machining condition information and the machining information in the database relative to that work element; wherein, when the database stores at least one of the machining condition information and the machining information relative to a work element that is usable to create a desired feature in a second object by the NC machining, the at least one of the machining condition information and the machining information relative to that work element can be obtained from the database for inclusion in a second NC program for the second object.
 5. A method of building a database of machining know-how information regarding NC machining work elements usable in a first NC program for NC machining, wherein the NC machining is controllable using the first NC program to form a first object, comprising: extracting, for each of at least one work element of the first NC program, at least one of machining information and machining condition information for that work element from the first NC program, wherein that work element is usable to create a corresponding feature in the first object; and storing, for each work element, the at least one of the machining condition information and the machining information in the database relative to that work element; wherein, when the database stores at least one of the machining condition information and the machining information relative to a work element that is usable to create a desired feature in a second object by the NC machining, the at least one of the machining condition information and the machining information relative to that work element can be obtained from the database for inclusion in a second NC program for the second object.
 6. An apparatus for analyzing an NC program for NC machining, wherein the NC machining is controlled by the NC program, comprising: machining method analyzing means, to which a machining NC program, material data and tool list are inputted, for extracting, from the machining NC program, at least one of a machining information and a machining condition for each work element machining by analyzing the machining NC program; database forming means for converting the at least one machining information and the machining condition extracted for each work element machining into a database which is necessary to form the machining NC program; and an NC program forming database for storing, for each work element machining, the at least one machining condition and machining information extracted from the machining NC program for that work element machining so as to correspond to that work element machining. 